import 'package:lz_login/generated/json/base/json_convert_content.dart';
import 'package:lz_login/src/bean/user_login_rsp_entity.dart';

UserLoginRspEntity $UserLoginRspEntityFromJson(Map<String, dynamic> json) {
	final UserLoginRspEntity userLoginRspEntity = UserLoginRspEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		userLoginRspEntity.code = code;
	}
	final UserLoginRspData? data = jsonConvert.convert<UserLoginRspData>(json['data']);
	if (data != null) {
		userLoginRspEntity.data = data;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		userLoginRspEntity.msg = msg;
	}
	final bool? success = jsonConvert.convert<bool>(json['success']);
	if (success != null) {
		userLoginRspEntity.success = success;
	}
	return userLoginRspEntity;
}

Map<String, dynamic> $UserLoginRspEntityToJson(UserLoginRspEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['data'] = entity.data?.toJson();
	data['msg'] = entity.msg;
	data['success'] = entity.success;
	return data;
}

UserLoginRspData $UserLoginRspDataFromJson(Map<String, dynamic> json) {
	final UserLoginRspData userLoginRspData = UserLoginRspData();
	final String? account = jsonConvert.convert<String>(json['account']);
	if (account != null) {
		userLoginRspData.account = account;
	}
	final int? adminType = jsonConvert.convert<int>(json['adminType']);
	if (adminType != null) {
		userLoginRspData.adminType = adminType;
	}
	final String? application = jsonConvert.convert<String>(json['application']);
	if (application != null) {
		userLoginRspData.application = application;
	}
	final List<dynamic>? apps = jsonConvert.convertListNotNull<dynamic>(json['apps']);
	if (apps != null) {
		userLoginRspData.apps = apps;
	}
	final dynamic? avatar = jsonConvert.convert<dynamic>(json['avatar']);
	if (avatar != null) {
		userLoginRspData.avatar = avatar;
	}
	final dynamic? birthday = jsonConvert.convert<dynamic>(json['birthday']);
	if (birthday != null) {
		userLoginRspData.birthday = birthday;
	}
	final dynamic? email = jsonConvert.convert<dynamic>(json['email']);
	if (email != null) {
		userLoginRspData.email = email;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		userLoginRspData.id = id;
	}
	final String? lastLoginAddress = jsonConvert.convert<String>(json['lastLoginAddress']);
	if (lastLoginAddress != null) {
		userLoginRspData.lastLoginAddress = lastLoginAddress;
	}
	final String? lastLoginBrowser = jsonConvert.convert<String>(json['lastLoginBrowser']);
	if (lastLoginBrowser != null) {
		userLoginRspData.lastLoginBrowser = lastLoginBrowser;
	}
	final String? lastLoginIp = jsonConvert.convert<String>(json['lastLoginIp']);
	if (lastLoginIp != null) {
		userLoginRspData.lastLoginIp = lastLoginIp;
	}
	final String? lastLoginOs = jsonConvert.convert<String>(json['lastLoginOs']);
	if (lastLoginOs != null) {
		userLoginRspData.lastLoginOs = lastLoginOs;
	}
	final String? lastLoginTime = jsonConvert.convert<String>(json['lastLoginTime']);
	if (lastLoginTime != null) {
		userLoginRspData.lastLoginTime = lastLoginTime;
	}
	final dynamic? memberRoleRelation = jsonConvert.convert<dynamic>(json['memberRoleRelation']);
	if (memberRoleRelation != null) {
		userLoginRspData.memberRoleRelation = memberRoleRelation;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		userLoginRspData.name = name;
	}
	final dynamic? nickName = jsonConvert.convert<dynamic>(json['nickName']);
	if (nickName != null) {
		userLoginRspData.nickName = nickName;
	}
	final String? phone = jsonConvert.convert<String>(json['phone']);
	if (phone != null) {
		userLoginRspData.phone = phone;
	}
	final int? sex = jsonConvert.convert<int>(json['sex']);
	if (sex != null) {
		userLoginRspData.sex = sex;
	}
	final dynamic? tel = jsonConvert.convert<dynamic>(json['tel']);
	if (tel != null) {
		userLoginRspData.tel = tel;
	}
	final String? token = jsonConvert.convert<String>(json['token']);
	if (token != null) {
		userLoginRspData.token = token;
	}
	final List<UserLoginRspDataUserMainOrgAndMemberVOS>? userMainOrgAndMemberVOS = jsonConvert.convertListNotNull<UserLoginRspDataUserMainOrgAndMemberVOS>(json['userMainOrgAndMemberVOS']);
	if (userMainOrgAndMemberVOS != null) {
		userLoginRspData.userMainOrgAndMemberVOS = userMainOrgAndMemberVOS;
	}
	return userLoginRspData;
}

Map<String, dynamic> $UserLoginRspDataToJson(UserLoginRspData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['account'] = entity.account;
	data['adminType'] = entity.adminType;
	data['application'] = entity.application;
	data['apps'] =  entity.apps;
	data['avatar'] = entity.avatar;
	data['birthday'] = entity.birthday;
	data['email'] = entity.email;
	data['id'] = entity.id;
	data['lastLoginAddress'] = entity.lastLoginAddress;
	data['lastLoginBrowser'] = entity.lastLoginBrowser;
	data['lastLoginIp'] = entity.lastLoginIp;
	data['lastLoginOs'] = entity.lastLoginOs;
	data['lastLoginTime'] = entity.lastLoginTime;
	data['memberRoleRelation'] = entity.memberRoleRelation;
	data['name'] = entity.name;
	data['nickName'] = entity.nickName;
	data['phone'] = entity.phone;
	data['sex'] = entity.sex;
	data['tel'] = entity.tel;
	data['token'] = entity.token;
	data['userMainOrgAndMemberVOS'] =  entity.userMainOrgAndMemberVOS?.map((v) => v.toJson()).toList();
	return data;
}

UserLoginRspDataUserMainOrgAndMemberVOS $UserLoginRspDataUserMainOrgAndMemberVOSFromJson(Map<String, dynamic> json) {
	final UserLoginRspDataUserMainOrgAndMemberVOS userLoginRspDataUserMainOrgAndMemberVOS = UserLoginRspDataUserMainOrgAndMemberVOS();
	final dynamic? mainOrgId = jsonConvert.convert<dynamic>(json['mainOrgId']);
	if (mainOrgId != null) {
		userLoginRspDataUserMainOrgAndMemberVOS.mainOrgId = mainOrgId;
	}
	final dynamic? mainOrgName = jsonConvert.convert<dynamic>(json['mainOrgName']);
	if (mainOrgName != null) {
		userLoginRspDataUserMainOrgAndMemberVOS.mainOrgName = mainOrgName;
	}
	final dynamic? mainOrgNo = jsonConvert.convert<dynamic>(json['mainOrgNo']);
	if (mainOrgNo != null) {
		userLoginRspDataUserMainOrgAndMemberVOS.mainOrgNo = mainOrgNo;
	}
	final String? memberCertificationNumber = jsonConvert.convert<String>(json['memberCertificationNumber']);
	if (memberCertificationNumber != null) {
		userLoginRspDataUserMainOrgAndMemberVOS.memberCertificationNumber = memberCertificationNumber;
	}
	final String? memberCode = jsonConvert.convert<String>(json['memberCode']);
	if (memberCode != null) {
		userLoginRspDataUserMainOrgAndMemberVOS.memberCode = memberCode;
	}
	final String? memberId = jsonConvert.convert<String>(json['memberId']);
	if (memberId != null) {
		userLoginRspDataUserMainOrgAndMemberVOS.memberId = memberId;
	}
	final String? memberName = jsonConvert.convert<String>(json['memberName']);
	if (memberName != null) {
		userLoginRspDataUserMainOrgAndMemberVOS.memberName = memberName;
	}
	return userLoginRspDataUserMainOrgAndMemberVOS;
}

Map<String, dynamic> $UserLoginRspDataUserMainOrgAndMemberVOSToJson(UserLoginRspDataUserMainOrgAndMemberVOS entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['mainOrgId'] = entity.mainOrgId;
	data['mainOrgName'] = entity.mainOrgName;
	data['mainOrgNo'] = entity.mainOrgNo;
	data['memberCertificationNumber'] = entity.memberCertificationNumber;
	data['memberCode'] = entity.memberCode;
	data['memberId'] = entity.memberId;
	data['memberName'] = entity.memberName;
	return data;
}